package com.softa.bean;

import java.util.Set;

/**
 * Created by yangl on 2017/1/5.
 */
public class Result<T> {

    private Integer status;

    private String code;

    private Set<T> errorMessages;

    private String message;

    private Object data;

    public Result() {}

    public Result(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    public Result(Integer status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public Result(Integer status, String code, Set<T> errorMessages) {
        this.status = status;
        this.code = code;
        this.errorMessages = errorMessages;
    }

    public Result(Integer status, String code, String message) {
        this.status = status;
        this.code = code;
        this.message = message;
    }

    public Result(Integer status, String code, Set<T> errorMessages, String message, Object data) {
        this.status = status;
        this.code = code;
        this.errorMessages = errorMessages;
        this.message = message;
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Set<T> getErrorMessages() {
        return errorMessages;
    }

    public void setErrorMessages(Set<T> errorMessages) {
        this.errorMessages = errorMessages;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public enum ResultStatus{
        SUCCESS,Fail
    }

}
